# Maintainer: Noam Preil <pleasantatk@gmail.com>
pkgname=pavucontrol
pkgver=5.0
pkgrel=4
pkgdesc="Pulseaudio Volume Control, GTK based mixer for Pulseaudio"
url="https://freedesktop.org/software/pulseaudio/pavucontrol/"
arch="all"
license="GPL-2.0-or-later"
subpackages="$pkgname-lang $pkgname-doc"
makedepends="
	automake
	gtkmm3-dev
	json-glib-dev
	libcanberra-dev
	m4
	pulseaudio-dev
	"
source="https://freedesktop.org/software/pulseaudio/pavucontrol/pavucontrol-$pkgver.tar.gz
	sink-truehd-dtshd.patch
	focus-trap.patch
	desktop-warning.patch
	fallback-default.patch
	peak-bars.patch
	"

build() {
	CXXFLAGS="$CXXFLAGS -flto=auto" \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--datadir=/usr/share \
		--disable-lynx \
		--disable-nls
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
edf404290baf2f483072202d0321d7e70c73bd269857c54acba623359a0f216eeb92c63c7e6bfc7312a8f3729bf6a6ea539a5a91f9de7c6d23667c5b0d54c37c  pavucontrol-5.0.tar.gz
f6018a1f45c3a0af425dca75622ff07b2918e23a2016dcb93f5651293ff238939c1bae1e764579ccbb3d3c3f5eb34dcfe369e8ad093e6722bb760d2ed84662a3  sink-truehd-dtshd.patch
b5a93201e29149e45828ff24e67b99a1257d0a69e0e1db380387530a04f840c7674b057e371baed1645400e5fadc38e6d39280bba8b566951a2815ade401af5a  focus-trap.patch
634c7bd2e293cf11dd003fa80d779e86a9be85a8cc376838f12b73e06c67bf2c13837b31e49605ff644f39e6274013e4bc5cb3b40baea76c81682332ef2cb793  desktop-warning.patch
d71290b1189207b02251e1a515d44f1de29c5db7075906493e93b0383b172803d933eae8bff957b5e4cfcaee994da503dfb00f4155a6a9e4ef5ebfda364c8a98  fallback-default.patch
02f675ef8461ad90d2034bd368646be09d730ef0c2a3997c37a3cc593bf4aa17e9b56cb981b769ead4f7e22b4c083e59ec8ce7787708068fc19318855c50e572  peak-bars.patch
"
